/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package social.p2pnative.model;

import java.util.ArrayList;

/**
 *
 * @author cadmilo
 */
public class AdvertisementClass {

    private String qualifiedName;
    private String name;
    private String mimeType;
    private String type;
    private ArrayList<AdvertisementField> fields;

    public AdvertisementClass(String qualifiedName, String name, String mimeType, String type, ArrayList<AdvertisementField> fields) {
        this.qualifiedName = qualifiedName;
        this.name = name;
        this.mimeType = mimeType;
        this.type = type;
        this.fields = fields;
    }
    
    public ArrayList<AdvertisementField> getFields() {
        return fields;
    }

    public void setFields(ArrayList<AdvertisementField> fields) {
        this.fields = fields;
    }

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQualifiedName() {
        return qualifiedName;
    }

    public void setQualifiedName(String qualifiedName) {
        this.qualifiedName = qualifiedName;
    }

    
    
    public String getPackage() {
        return qualifiedName.replaceAll("[.]" + name, "");
    }

}
